home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
pasprog.EXE
/
SPIRAL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-08-30
|
600b
|
32 lines
Program SPIRAL;
Uses Crt,Graph;
Var
Xi,Yi,X,Y,Teta,Rad: Real;
Cx,Cy,Gd,Gm: integer;
Mx,My: integer;
Begin
DetectGraph(Gd,Gm);
InitGraph(Gd,Gm,'');
Mx:=GetMaxX;
My:=GetMaxY;
Cx:=Trunc(Mx/2);
Cy:=Trunc(My/2);
Rad:=10;
Teta:=0;
Xi:=Rad*Cos(Teta);
Yi:=Rad*Sin(Teta);
MoveTo(Round(Cx+Xi),Round(Cy+Yi));
While Rad < 75 do
Begin
Teta:=Teta+0.1;
Rad:=Rad+0.1;
X:=Rad*Cos(Teta);
Y:=Rad*Sin(Teta);
LineTo(Round(Cx+X),Round(Cy+Y));
End;
Repeat until keypressed;
CloseGraph;
End.